import 'package:flutter_test/flutter_test.dart';
import 'package:module_me/module_me.dart';
import 'package:module_me/module_me_platform_interface.dart';
import 'package:module_me/module_me_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockModuleMePlatform
    with MockPlatformInterfaceMixin
    implements ModuleMePlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final ModuleMePlatform initialPlatform = ModuleMePlatform.instance;

  test('$MethodChannelModuleMe is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelModuleMe>());
  });

  test('getPlatformVersion', () async {
    ModuleMe moduleMePlugin = ModuleMe();
    MockModuleMePlatform fakePlatform = MockModuleMePlatform();
    ModuleMePlatform.instance = fakePlatform;

    expect(await moduleMePlugin.getPlatformVersion(), '42');
  });
}
